#ifndef INPUT_H
#define INPUT_H

#include <SDL/SDL.h>

namespace Eternal
{
	enum eKey
	{
		KEY_LEFT = SDLK_LEFT,
		KEY_RIGHT = SDLK_RIGHT,
		KEY_UP = SDLK_UP,
		KEY_DOWN = SDLK_DOWN,
		KEY_SPACE = SDLK_SPACE,
		KEY_ESC = SDLK_ESCAPE
	};
	namespace Core
	{
		class InputManager
		{
			public:
				InputManager();
				~InputManager();
				
				inline void Initialize()
				{
					Keys = SDL_GetKeyState(NULL);
				}
				
				void BeginFrame();
				
				int GetMouseX() const;
				int GetMouseY() const;
				
				bool IsKeyHit(eKey key) const;
				bool IsKeyPress(eKey key) const;
			private:
				Uint8 *Keys;
				bool prevStates[256];
				int mX, mY;
		};
	}
}

#endif